/**
 * @Author bianpengfei
 * @create 2020/12/18 14:56
 */
export const loadJS = (url, callback) => {
  return new Promise((resolve) => {
    var script = document.createElement('script'),
      fn = callback || function () {}
    script.type = 'text/javascript'
    // IE
    if (script.readyState) {
      script.onreadystatechange = function () {
        if (script.readyState == 'loaded' || script.readyState == 'complete') {
          script.onreadystatechange = null
          fn()
          resolve()
        }
      }
    } else {
      // 其他浏览器
      script.onload = function () {
        fn()
        resolve()
      }
    }
    script.src = url
    document.getElementsByTagName('head')[0].appendChild(script)
  })
}

export const uploadFileConfig = () => {}

export const uploadFileName = () => {}

export const qiniuErrorCode = () => {}
